home *** CD-ROM | disk | FTP | other *** search
/ Internet the City / Internet The City.iso / mac / Internet the City™ Files / itcres / data.Dxr / Internal_9_tools.ls < prev    next >
Encoding:
Text File  |  1997-06-03  |  4.3 KB  |  169 lines

  1. on clearcastscripts
  2.   set total to the number of castMembers
  3.   repeat with x = 1 to total
  4.     if the type of member x = #bitmap then
  5.       set the scriptText of member x to EMPTY
  6.     end if
  7.   end repeat
  8. end
  9.  
  10. on listmembers
  11.   set total to the number of castMembers
  12.   set Counter to 0
  13.   set castlist to EMPTY
  14.   repeat with x = 1 to total
  15.     if the type of member x = #bitmap then
  16.       if the fileName of member x = EMPTY then
  17.         set Counter to Counter + 1
  18.         put the name of member x into line Counter of castlist
  19.       end if
  20.     end if
  21.   end repeat
  22.   put castlist
  23. end
  24.  
  25. on getmovienames
  26.   repeat with x = 303 to 314
  27.     put the name of member x
  28.   end repeat
  29. end
  30.  
  31. on checkextcasts
  32.   set nextname to "x"
  33.   set linno to 0
  34.   repeat while nextname <> EMPTY
  35.     set lineno to lineno + 1
  36.     set nextname to getNthFileNameInFolder(the pathName & "frefd", lineno)
  37.     if the number of member nextname < 1 then
  38.       put nextname
  39.     end if
  40.   end repeat
  41. end
  42.  
  43. on importfiles f, t
  44.   repeat with x = f to t
  45.     if the fileName of member x = EMPTY then
  46.       next repeat
  47.     end if
  48.     importFileInto(member x, the pathName & "frefd:" & the name of member x)
  49.   end repeat
  50. end
  51.  
  52. on listImportedFiles
  53.   set nextname to "x"
  54.   set linno to 0
  55.   repeat while nextname <> EMPTY
  56.     set lineno to lineno + 1
  57.     set nextname to getNthFileNameInFolder(the pathName & "frefd", lineno)
  58.     if the number of member nextname < 1 then
  59.       put "no cast named" && nextname
  60.       next repeat
  61.     end if
  62.     if the fileName of cast nextname = EMPTY then
  63.       put nextname
  64.     end if
  65.   end repeat
  66. end
  67.  
  68. on checkmembernames f, t
  69.   repeat with x = f to t
  70.     if not (the fileName of member x contains the name of member x) then
  71.       put the name of member x && x
  72.     end if
  73.   end repeat
  74. end
  75.  
  76. on checkpaused which
  77.   set total to the number of castMembers of castLib which
  78.   repeat with x = 1 to total
  79.     if the type of member x of castLib which = #digitalVideo then
  80.       if the pausedAtStart of member x of castLib which = 0 then
  81.         if "g_url.mov g_edi.mov g_pro.mov" contains the name of member x then
  82.           set the pausedAtStart of member x of castLib which to 0
  83.           next repeat
  84.         end if
  85.         set the pausedAtStart of member x of castLib which to 1
  86.       end if
  87.     end if
  88.   end repeat
  89. end
  90.  
  91. on checkloaded whichlib
  92.   global gloadedlist
  93.   set gloadedlist to []
  94.   set total to the number of castMembers of castLib whichlib
  95.   repeat with x = 1 to total
  96.     if (the type of member x <> #empty) and (the loaded of member x of castLib whichlib = 1) then
  97.       put x && the name of member x of castLib whichlib && the size of member x of castLib whichlib
  98.       add(gloadedlist, x)
  99.     end if
  100.   end repeat
  101. end
  102.  
  103. on clearfiles
  104.   set total to the number of castMembers of castLib 2
  105.   repeat with x = 1 to total
  106.     set the fileName of member x of castLib 2 to the name of member x of castLib 2
  107.   end repeat
  108. end
  109.  
  110. on cleartabs whichmember
  111.   set total to the number of chars in field whichmember of castLib 2
  112.   repeat with c = 1 to total
  113.     if charToNum(char c of field whichmember of castLib 2) = 9 then
  114.       put "    " into char c of field whichmember of castLib 2
  115.       set total to total + 4
  116.     end if
  117.   end repeat
  118. end
  119.  
  120. on getnewloaded whichlib
  121.   global gloadedlist
  122.   set total to the number of castMembers of castLib whichlib
  123.   repeat with x = 1 to total
  124.     if (the type of member x <> #empty) and (the loaded of member x of castLib whichlib = 1) then
  125.       if getOne(gloadedlist, x) = 0 then
  126.         put x
  127.       end if
  128.     end if
  129.   end repeat
  130. end
  131.  
  132. on setloadedlist whichlib
  133.   global gloadedlist
  134.   set gloadedlist to []
  135.   set total to the number of castMembers of castLib whichlib
  136.   repeat with x = 1 to total
  137.     if (the type of member x <> #empty) and (the loaded of member x of castLib whichlib = 1) then
  138.       add(gloadedlist, x)
  139.     end if
  140.   end repeat
  141. end
  142.  
  143. on checkframe
  144.   repeat with x = 1 to 48
  145.     set n to the castLibNum of sprite x
  146.     if n > 3 then
  147.       put the frame & ": sprite " & x & " is in castlib " & n
  148.     end if
  149.   end repeat
  150. end
  151.  
  152. on checkallframes
  153.   set t to the lastFrame
  154.   repeat with x = 1 to t
  155.     go(x)
  156.     checkframe()
  157.   end repeat
  158. end
  159.  
  160. on replaceallcasts
  161.   set total to the number of castMembers of castLib 4
  162.   repeat with x = 1 to total
  163.     if the type of member x of castLib 4 = #bitmap then
  164.       copyToClipBoard(member x of castLib 4)
  165.       pasteClipBoardInto(member x of castLib 1)
  166.     end if
  167.   end repeat
  168. end
  169.